package com.pan.service;


import com.pan.entity.Result;
import com.pan.vo.CouponShowVo;
import com.pan.vo.UserCouponShowVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface CouponHistoryService {

    Result<CouponShowVo> selectCouponInfo(Long couponHistoryId);

    Result<List<UserCouponShowVo>> selectByUser(String userTicket);

//    @GlobalTransactional
    Result receiveCoupon(String userTicket, Long couponId);

    @Transactional
    Result useCoupon(String userTicket, Long id, Long orderId);

    Result<Boolean> isUserCoupon(Long userId, Long couponHistoryId);
}
